<template>
	<app-scroll-inview
		:extra-padding="inviewPadding"
		@inview="onInviewChange(true)"
		@outview="onInviewChange(false)"
	>
		<app-activity-feed-item-placeholder v-if="item.type !== 'notification' && !isBootstrapped" />
		<template v-else>
			<!--
			Notifications are so small that there's no reason to not include them
			into the view.
		-->
			<app-activity-feed-event-item
				v-if="item.type === 'event-item'"
				:item="item"
				@expanded="onExpanded"
				@resize="onResize"
			/>
			<app-activity-feed-notification v-else-if="item.type === 'notification'" :item="item" />
		</template>
	</app-scroll-inview>
</template>

<script lang="ts" src="./item"></script>
